# -*- coding: utf-8 -*-

"""
@name: run
@author: Memory
@date: 2021/05/08
@document: 游戏服务端的入口文件
"""

from twisted.internet.endpoints import TCP4ServerEndpoint
from twisted.internet import reactor
from server import BCServerFactory
from configs import *
from utils import createDatabase


if __name__ == '__main__':
    createDatabase()
    endpoint = TCP4ServerEndpoint(reactor, PORT)
    endpoint.listen(BCServerFactory())
    reactor.run()
